import axios from "./index"

export const ManagementList = (currentPage, pageSize) =>
  axios({
    url: "/customer/queryList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
    },
  })

export const SpecificQuery = (currentPage, pageSize, userObj) =>
  axios({
    url: "/customer/specificQueryList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
      id: userObj.member_grade_id,
      member_grade_id: userObj.member_grade_id,
      name: userObj.name,
      registration_time: userObj.registration_time
    },
  })

// 查看客户信息
export const SeeCustomer = (id) =>
  axios({
    url: "/customer/seeCustomer",
    method: "POST",
    data: {
      id
    },
  })



// 客户按照会员等级排序
export const GradeSortList = (currentPage, pageSize) =>
  axios({
    url: "/customer/gradeSortList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
    },
  })


// 客户按照贷款金额排序
export const MoneySortList = (currentPage, pageSize) =>
  axios({
    url: "/customer/moneySortList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
    },
  })

// 客户按照订单排序
export const OrderSortList = (currentPage, pageSize) =>
  axios({
    url: "/customer/orderSortList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
    },
  })

  
// 客户按照注册时间排序
export const TimeSortList = (currentPage, pageSize) =>
  axios({
    url: "/customer/timeSortList",
    method: "POST",
    data: {
      currentPage,
      pageSize,
    },
  })